Optimal. Leaf size=24 \[ \tan ^{-1}\left (\frac {\tan (x)}{\sqrt {\tan ^2(x)+2}}\right )+\sinh ^{-1}\left (\frac {\tan (x)}{\sqrt {2}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {4128, 402, 215, 377, 203} \[ \tan ^{-1}\left (\frac {\tan (x)}{\sqrt {\tan ^2(x)+2}}\right )+\sinh ^{-1}\left (\frac {\tan (x)}{\sqrt {2}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 215
Rule 377
Rule 402
Rule 4128
Rubi steps
\begin {align*} \int \sqrt {1+\sec ^2(x)} \, dx &=\operatorname {Subst}\left (\int \frac {\sqrt {2+x^2}}{1+x^2} \, dx,x,\tan (x)\right )\\ &=\operatorname {Subst}\left (\int \frac {1}{\sqrt {2+x^2}} \, dx,x,\tan (x)\right )+\operatorname {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \sqrt {2+x^2}} \, dx,x,\tan (x)\right )\\ &=\sinh ^{-1}\left (\frac {\tan (x)}{\sqrt {2}}\right )+\operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\frac {\tan (x)}{\sqrt {2+\tan ^2(x)}}\right )\\ &=\sinh ^{-1}\left (\frac {\tan (x)}{\sqrt {2}}\right )+\tan ^{-1}\left (\frac {\tan (x)}{\sqrt {2+\tan ^2(x)}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.05, size = 57, normalized size = 2.38 \[ \frac {\sqrt {2} \cos (x) \sqrt {\sec ^2(x)+1} \left (\sin ^{-1}\left (\frac {\sin (x)}{\sqrt {2}}\right )+\tanh ^{-1}\left (\frac {\sqrt {2} \sin (x)}{\sqrt {\cos (2 x)+3}}\right )\right )}{\sqrt {\cos (2 x)+3}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.57, size = 131, normalized size = 5.46 \[ \frac {1}{2} \, \arctan \left (\frac {\sqrt {\frac {\cos \relax (x)^{2} + 1}{\cos \relax (x)^{2}}} \cos \relax (x)^{3} \sin \relax (x) + \cos \relax (x) \sin \relax (x)}{\cos \relax (x)^{4} + \cos \relax (x)^{2} - 1}\right ) - \frac {1}{2} \, \arctan \left (\frac {\sin \relax (x)}{\cos \relax (x)}\right ) + \frac {1}{2} \, \log \left (\cos \relax (x)^{2} + \cos \relax (x) \sin \relax (x) + {\left (\cos \relax (x)^{2} + \cos \relax (x) \sin \relax (x)\right )} \sqrt {\frac {\cos \relax (x)^{2} + 1}{\cos \relax (x)^{2}}} + 1\right ) - \frac {1}{2} \, \log \left (\cos \relax (x)^{2} - \cos \relax (x) \sin \relax (x) + {\left (\cos \relax (x)^{2} - \cos \relax (x) \sin \relax (x)\right )} \sqrt {\frac {\cos \relax (x)^{2} + 1}{\cos \relax (x)^{2}}} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {\sec \relax (x)^{2} + 1}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 2.70, size = 190, normalized size = 7.92 \[ \frac {\left (-1+i\right ) \left (\left (-1\right )^{\frac {3}{4}} \EllipticPi \left (\frac {\left (-1\right )^{\frac {1}{4}} \left (-1+\cos \relax (x )\right )}{\sin \relax (x )}, -i, i\right )+\left (-1\right )^{\frac {3}{4}} \EllipticPi \left (\frac {\left (-1\right )^{\frac {1}{4}} \left (-1+\cos \relax (x )\right )}{\sin \relax (x )}, i, i\right )+\sqrt {2}\, \EllipticF \left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt {2}\, \left (-1+\cos \relax (x )\right )}{\sin \relax (x )}, i\right )-\left (-1\right )^{\frac {1}{4}} \EllipticPi \left (\frac {\left (-1\right )^{\frac {1}{4}} \left (-1+\cos \relax (x )\right )}{\sin \relax (x )}, -i, i\right )-\left (-1\right )^{\frac {1}{4}} \EllipticPi \left (\frac {\left (-1\right )^{\frac {1}{4}} \left (-1+\cos \relax (x )\right )}{\sin \relax (x )}, i, i\right )\right ) \cos \relax (x ) \left (\sin ^{2}\relax (x )\right ) \sqrt {\frac {1+\cos ^{2}\relax (x )}{\cos \relax (x )^{2}}}\, \sqrt {\frac {i \cos \relax (x )+1-i+\cos \relax (x )}{\cos \relax (x )+1}}\, \sqrt {-\frac {i \cos \relax (x )-\cos \relax (x )-1-i}{\cos \relax (x )+1}}}{\left (-1+\cos \relax (x )\right ) \left (1+\cos ^{2}\relax (x )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.04 \[ \int \sqrt {\frac {1}{{\cos \relax (x)}^2}+1} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {\sec ^{2}{\relax (x )} + 1}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________